package com.example.administrator.wallet.view.fragment.quotation;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.widget.ListView;

import com.example.administrator.wallet.R;
import com.example.administrator.wallet.adapter.CoinTransactionActivityListviewAdapter;
import com.example.administrator.wallet.base.BaseFragment;
import com.example.administrator.wallet.model.bean.BTCFragmentDataBean;
import com.example.administrator.wallet.model.bean.CoinMarketBean;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;

/**
 * A simple {@link Fragment} subclass.
 */
public class SelfFragment extends BaseFragment {

    @Bind(R.id.lv_fragment_self)
    ListView listView;
    private List<BTCFragmentDataBean> dataBeanList;

    private CoinTransactionActivityListviewAdapter adapter;

    @Override
    public void init() {

        dataBeanList = new ArrayList<>();

        try{
            Bundle bundle = getArguments();
            String str = bundle.getString("detailList");
            CoinMarketBean.DataBean.ListBean dataBean = new CoinMarketBean.DataBean.ListBean();
            dataBean.setMoney(str);
            dataBean.setStock(str);
        } catch (Exception e){
            Log.e("TAG",e.getLocalizedMessage());
        }


        List<CoinMarketBean.DataBean.ListBean> list = new CoinMarketBean.DataBean().getList();
        //list.add(dataBean);

        adapter = new CoinTransactionActivityListviewAdapter(getActivity(),dataBeanList);
        listView.setAdapter(adapter);
    }

    @Override
    public int getLayoutResource() {
        return R.layout.fragment_self;
    }
}
